package com.codeduck;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Log4jApplication {
    private static final Logger LOGGER = LoggerFactory.getLogger(Log4jApplication.class);
    public static void main(String[] args) {
        SpringApplication.run(Log4jApplication.class);
        LOGGER.error("Exception: {}", new NullPointerException("null"));
            LOGGER.info("info log: [{}], [{}], [{}]", "你好", 1, false);
            LOGGER.warn("warn log");
            LOGGER.error("error log");
            LOGGER.debug("debug log");


    }
}